
\mode<presentation>

% Le fond d'�cran
%
\pgfdeclareimage[height=.4\paperheight,width=\paperwidth]{titlepage}{theme_image8}
\pgfdeclareimage[width=\paperwidth,height=.08\paperheight]{frameheader}{theme_image3}
\pgfdeclareimage[width=10pt]{sodi-bullet-1}{theme_image5}
\pgfdeclareimage[width=8pt]{sodi-bullet-2}{theme_image6}
\pgfdeclareimage[width=6pt]{sodi-bullet-3}{theme_image7}
\pgfdeclareimage[height=6pt]{logo-sodifrance}{theme_image4}
%\pgfdeclareimage[height=\paperheight,width=\paperwidth]{fond_page}{fond_page}
%\pgfdeclareimage{short-logo}{image4}
\pgfdeclareimage[width=.35\paperwidth, height=.07\paperheight]{full-logo}{theme_image2}

\logo{\pgfuseimage{logo-sodifrance}}

%The default sodifrance footline
\newcommand{\DefSodifranceFootline}%
{%
  \ifnum\c@framenumber=1%
  	\vskip.01\paperwidth%
  \else%
  	\leavevmode%
  	\hbox{%  	
  	\hskip.2cm\insertlogo%
  	%The navigation bar
  	\hskip.20\paperwidth%
  	\usebeamertemplate*{navigation symbols}%
    %The page number
    \hskip.23\paperwidth%
    \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]
    {page in head/foot}%
     	\usebeamercolor[fg]{page in head/foot}%
    	\insertframenumber/\inserttotalframenumber%
    \end{beamercolorbox}
%\begin{beamercolorbox}[wd=.33\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fill]{author in head/foot}% 
%\usebeamerfont{author in head/foot}\insertshortauthor
%  	\end{beamercolorbox}%
%  	\begin{beamercolorbox}[wd=.33\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm
%  plus1fil,rightskip=.3cm plus1fil]{title in head/foot}% 
%  	\usebeamerfont{title in head/foot}\insertshorttitle
%  	\end{beamercolorbox}
	}%hbox
  	\vskip.01\paperwidth%
  \fi%
}%

%The background image
\setbeamertemplate{background}{
  \ifnum\c@framenumber=1%
    \pgfuseimage{titlepage}%
  \else%
  	\pgfuseimage{frameheader}%
  \fi%
}


% La "fl�che" (� queue pointue, dans un cercle)
%
%\RequirePackage{tikz}
%\newlength\fsz  % fleche size
%\newcommand{\fleche}{\pgfuseimage{short-logo}}
%\setlength{\fsz}{\fontcharht\font `X
%\settoheight{\fsz}{X}
%\begin{tikzpicture}
%\draw[line width=0.05\fsz] (0.5\fsz,0.5\fsz) circle (0.45\fsz);
%\fill	(0.47\fsz,0.66\fsz) -- (0.48\fsz,0.55\fsz) -- (0.14\fsz,0.52\fsz) --
%	(0.14\fsz,0.48\fsz) -- (0.48\fsz,0.45\fsz) -- (0.47\fsz,0.33\fsz) --
%        (0.85\fsz,0.50\fsz) -- cycle ;
%\end{tikzpicture}}



\setbeamercolor{section in head/foot}{parent=palette quaternary}
\setbeamercolor{subsection in head/foot}{parent=palette primary}

\setbeamercolor{author in head/foot}{parent=section in head/foot}
\setbeamercolor{title in head/foot}{parent=subsection in head/foot}


\usesectionheadtemplate
  {\hfill\insertsectionhead}
  {\hfill\color{fg!50!bg}\insertsectionhead}

\defbeamertemplate*{headline}{Sodifrance theme}
{%
  \leavevmode%
  \vskip0.09\paperheight% % Je me d�cale de la hauteur du bandeau �cole...
}


\defbeamertemplate*{footline}{Sodifrance theme}
{%
	\DefSodifranceFootline
}

\setbeamerfont{page number in sidebar}{size=\scriptsize}

\setbeamersize{sidebar width right=0pt}
\setbeamersize{sidebar width left=0pt}
\defbeamertemplate*{sidebar left}{Sodifrance theme}{}
%{%
%  \ifnum\c@framenumber>1%
%  { \vskip0.055\paperheight%
%    \hskip0.05\paperwidth%
%    \usebeamercolor[fg]{page number in sidebar}%
%    \usebeamerfont{page number in sidebar}%
%    \insertpagenumber\,/\,\insertpresentationendpage%
% 	%The navigation bar
% 	\vfill%
%  	%\hskip0.1cm\insertlogo%
%  	\vskip2pt%
%  	\hskip0.1cm\usebeamertemplate*{navigation symbols}%
%  	\vskip2pt%
%  }\fi%
%}
\defbeamertemplate*{sidebar right}{Sodifrance theme}{}


\setbeamercolor{frametitle}{parent=subsection in head/foot}
\setbeamercolor{frametitle right}{parent=section in head/foot}

\defbeamertemplate*{frametitle}{Sodifrance theme}
{%
  \nointerlineskip%
  \vskip-2pt%
  \hbox{\leavevmode
    \advance\beamer@leftmargin by -12bp%
    \advance\beamer@rightmargin by -12bp%
    \beamer@tempdim=\textwidth%
    \advance\beamer@tempdim by \beamer@leftmargin%
    \advance\beamer@tempdim by \beamer@rightmargin%
    \hskip-\Gm@lmargin\hbox{%
      \setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
          \vbox{}\vskip-.75ex%
          \leftskip0.3cm%
          %\leftskip0.19\paperwidth % Largeur du dessin de la charte � gauche
          \rightskip0.3cm plus1fil\leavevmode
          \insertframetitle%
          \ifx\insertframesubtitle\@empty%
            \strut\par%
          \else
            \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
          \fi%
          \nointerlineskip
          \vbox{}%
          \end{minipage}}%
      \beamer@tempdim=\ht\beamer@tempbox%
      \advance\beamer@tempdim by 2pt%
      \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
        \usebeamercolor{frametitle right}
        \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
        \pgfusepath{clip}
        \pgftext[left,base]{} % C'est manifestement �a qui place le texte
      \end{pgfpicture}
      \hskip-\paperwidth%
      \box\beamer@tempbox%
    }%
    \hskip-\Gm@rmargin%
  }%
  \nointerlineskip
  \vskip-0.2pt
}


\mode<all>
